Repository navigation
Conversation
Change-Id: Ic3b5292a1f385ea6a75c30c775b3411efb227534
|
This is broken on Windows, I will have a look later today |
| if (ARROW_BUILD_TESTS OR ARROW_BUILD_BENCHMARKS) | ||
| # TODO(wesm): maybe find a better place to put shared auxiliary testing tools | ||
| # that depend on gtest | ||
| add_library(arrow_testing_aux STATIC src/arrow/test-util.cc) |
There was a problem hiding this comment.
Is there a reason why this must be STATIC? Maybe using OBJECT or SHARED will solve your problem on Windows, probably OBJECT is what you're looking for: compile once, link "statically" into the tests everywhere.
…inking issues on Windows
|
Argh, so the issue is more complex on Windows. The test utilities contain inline symbols from other Arrow headers, which seems to cause a conflict with the symbols in arrow.dll (multiply defined symbols). Since these are inline I don't really get why it's a problem. I don't know enough about linking on Windows to know how to fix this using the To resolve the issue, I am now building both static and shared variants of the testing helper library and linking the corresponding library depending on whether ARROW_BUILD_SHARED is on |
Change-Id: I076ca77a1b289fc49bcdc461ff68b40e2255e7cc
|
Another possibility would be to compile |
|
We can't do that because the test code depends on gtest |
|
We could of course make the compiled code not depend on gtest, but that would best be taken care of in another patch |
|
Windows is a huge pain. The static CRT build is failing on Windows for reasons unknown. I will have to keep looking at this later today |
|
I'm sure that has to do with different copies of the CRT being linked in. |
|
I'll look at removing the gtest-depending code from the object file. That will be easier for me than messing around with linker settings |
|
Started looking at this. The gtest stuff is pretty inextricable. We need to have functions like I'll keep looking at the static CRT thing for now |
|
OK, the key item is here: https://github.com/apache/arrow/blob/master/ci/appveyor-cpp-build.bat#L24 But the recent change to link the unit tests dynamically is forcing ARROW_BUILD_SHARED to be on. This is a bit hacky, so I'm going to introduce an ARROW_TESTS_LINKAGE argument so we can switch to static linkage for the tests |
…d to ON in Windows Static CRT build Change-Id: Id84d7fcaac61d06cf78c31103b6fbbdb696ab126
Change-Id: Ic0b782d6c3d8fb9bdbdcc68e2ce2fb11e6971887
|
Merging this |
This has to be compiled into a separate static library and added to the link libs for the unit tests and benchmarks